
package com.sec.android.app.myfiles.feature.multiwindow;

import android.app.Activity;
import android.graphics.Point;
import android.graphics.Rect;

import com.sec.android.app.myfiles.feature.MultiWindowMgr.WindowState;

public class MultiWindowImp extends AbsMultiWindowImp {

    public MultiWindowImp(Activity activity) {
        super(activity);
    }

    @Override
    public boolean isMultiWindow() {
        //return mActivity.isInMultiWindowMode();
        //TODO HYL  判断是否是multi window
        return false;
    }

    @Override
    public WindowState getWindowState() {
        WindowState ret = super.getWindowState();

        if (!isScaleWindow() && isMultiWindow()) {
            switch (ret) {
                case LANDSCAPE:
                    ret = WindowState.LANDSCAPE_MULTIWINDOW;
                    break;
                case PORTRAIT:
                    ret = WindowState.PORTRAIT_MULTIWINDOW;
                    break;
                default:
                    break;
            }
        }

        return ret;
    }

    @Override
    public Rect getRectInfo() {
        Rect ret = new Rect();
        Point pt = new Point();
        mActivity.getWindowManager().getDefaultDisplay().getSize(pt);
        ret.set(0, 0, pt.x, pt.y);

        return ret;
    }

    @Override
    public boolean isScaleWindow() {
        return false;
    }

}
